<template>
  <div class="leftSide">
    <el-menu class="el-menu-vertical-demo" router unique-opened>
      <el-submenu index="1" v-if="permissions_obj.id_92||permissions_obj.id_23||permissions_obj.id_99||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-s-custom"></i>
          <span>用户管理</span>
        </template>
        <el-menu-item index="1-1" :route="{path:'/userList'}" v-if="permissions_obj.id_92||permissions_obj.id_all">用户列表</el-menu-item>
        <!-- <el-menu-item index="1-2">黑名单列表</el-menu-item> -->
        <el-menu-item index="1-3" v-if="permissions_obj.id_23||permissions_obj.id_all">客服中心</el-menu-item>
        <!-- <el-menu-item index="1-4">账号找回</el-menu-item> -->
        <el-menu-item index="1-5" v-if="permissions_obj.id_99||permissions_obj.id_all">邀请列表</el-menu-item>
      </el-submenu>
      <el-submenu index="2" v-if="permissions_obj.id_43||permissions_obj.id_46||permissions_obj.id_47||permissions_obj.id_114||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-s-order"></i>
          <span>订单管理</span>
        </template>
        <el-menu-item index="2-1" v-if="permissions_obj.id_43||permissions_obj.id_all">订单管理</el-menu-item>
        <!-- <el-menu-item index="2-2">账单流水</el-menu-item> -->
        <el-menu-item index="2-3" v-if="permissions_obj.id_147||permissions_obj.id_all">钻石明细</el-menu-item>
        <!-- <el-menu-item index="2-4">余额管理</el-menu-item> -->
        <el-menu-item index="2-5" v-if="permissions_obj.id_195||permissions_obj.id_all">用户提现</el-menu-item>
        <el-menu-item index="2-6" v-if="permissions_obj.id_46||permissions_obj.id_all">每日充值</el-menu-item>
        <el-menu-item index="2-7" v-if="permissions_obj.id_47||permissions_obj.id_all">用户查单</el-menu-item>
        <el-menu-item index="2-8" v-if="permissions_obj.id_114||permissions_obj.id_all">每日用户成功率</el-menu-item>
      </el-submenu>
      <el-submenu index="3" v-if="permissions_obj.id_121||permissions_obj.id_120||permissions_obj.id_61||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-s-data"></i>
          <span>数据统计</span>
        </template>
        <el-menu-item index="3-1" v-if="permissions_obj.id_121||permissions_obj.id_all">充值/活跃/注册(报表)</el-menu-item>
        <el-menu-item index="3-2" v-if="permissions_obj.id_120||permissions_obj.id_all">充值/活跃/注册(折线图)</el-menu-item>
        <el-menu-item index="3-3" v-if="permissions_obj.id_61||permissions_obj.id_all">渠道统计</el-menu-item>
      </el-submenu>
      <el-submenu index="4" v-if="permissions_obj.id_116||permissions_obj.id_127||permissions_obj.id_85||permissions_obj.id_129||permissions_obj.id_156||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-s-cooperation"></i>
          <span>内容管理</span>
        </template>
        <el-menu-item index="4-1" v-if="permissions_obj.id_116||permissions_obj.id_all">视频管理</el-menu-item>
        <!-- <el-menu-item index="4-2">后台视频上传管理</el-menu-item> -->
        <!-- <el-menu-item index="4-3">社区动态管理</el-menu-item> -->
        <!-- <el-menu-item index="4-4" v-if="isShowTopicCircle">话题圈</el-menu-item> -->
        <!-- <el-menu-item index="4-5">发现及搜索</el-menu-item> -->
        <!-- <el-menu-item index="4-6">视频上传分类管理</el-menu-item> -->
        <!-- <el-menu-item index="4-7">视频关键词</el-menu-item> -->
        <el-menu-item index="4-8" v-if="permissions_obj.id_127||permissions_obj.id_all">回收站</el-menu-item>
        <el-menu-item index="4-9" v-if="permissions_obj.id_85||permissions_obj.id_all">标签管理</el-menu-item>
        <el-menu-item index="4-10" v-if="permissions_obj.id_129||permissions_obj.id_all">首页推荐视频管理</el-menu-item>
        <el-menu-item index="4-11"  v-if="permissions_obj.id_129||permissions_obj.id_all">首页免费视频管理</el-menu-item>
        <el-menu-item index="4-12" v-if="permissions_obj.id_156||permissions_obj.id_all">推荐模块管理</el-menu-item>
        <el-menu-item index="4-13" v-if="permissions_obj.id_199||permissions_obj.id_all">私照管理</el-menu-item>
        <el-menu-item index="4-15" v-if="permissions_obj.id_183||permissions_obj.id_all">楼凤信息管理</el-menu-item>
        <el-menu-item index="4-14" v-if="permissions_obj.id_208||permissions_obj.id_all">私照分类管理</el-menu-item>
        <el-menu-item index="4-16" v-if="permissions_obj.id_192||permissions_obj.id_all">楼凤地区管理</el-menu-item>
      </el-submenu>
      <el-submenu index="5" v-if="permissions_obj.id_143||permissions_obj.id_174||permissions_obj.id_168||permissions_obj.id_2||permissions_obj.id_12||permissions_obj.id_106||permissions_obj.id_117||permissions_obj.id_17||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-s-platform"></i>
          <span>运营管理</span>
        </template>
        <!-- <el-menu-item index="5-1">开机动画管理</el-menu-item>
        <el-menu-item index="5-2">图片广告管理</el-menu-item> -->
        <el-menu-item index="5-3" v-if="permissions_obj.id_2||permissions_obj.id_all">广告管理</el-menu-item>
        <el-menu-item index="5-4" v-if="permissions_obj.id_12||permissions_obj.id_all">会员卡管理</el-menu-item>
        <el-menu-item index="5-5" v-if="permissions_obj.id_168||permissions_obj.id_all">分享图片管理</el-menu-item>
        <el-menu-item index="5-12" v-if="permissions_obj.id_174||permissions_obj.id_all">每日签到管理</el-menu-item>
        <el-menu-item index="5-13" v-if="permissions_obj.id_143||permissions_obj.id_all">钻石套餐管理</el-menu-item>
        <el-menu-item index="5-14" v-if="permissions_obj.id_151||permissions_obj.id_all">交流中心管理</el-menu-item>
        <el-menu-item index="5-6" v-if="permissions_obj.id_106||permissions_obj.id_all">兑换码列表</el-menu-item>
        <el-menu-item index="5-7" v-if="permissions_obj.id_117||permissions_obj.id_all">兑换记录</el-menu-item>
        <el-menu-item index="5-8" v-if="permissions_obj.id_17||permissions_obj.id_all">渠道管理</el-menu-item>
        <!-- <el-menu-item index="5-9">邀请规则管理</el-menu-item> -->
        <!-- <el-menu-item index="5-10">邀请群管理</el-menu-item> -->
        <!-- <el-menu-item index="5-11">系统公告管理</el-menu-item> -->
      </el-submenu>
      <el-submenu index="6" v-if="permissions_obj.id_63||permissions_obj.id_101||permissions_obj.id_50||permissions_obj.id_56||permissions_obj.id_28||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-s-tools"></i>
          <span>系统管理</span>
        </template>
        <el-menu-item index="6-1" v-if="permissions_obj.id_63||permissions_obj.id_all">系统配置</el-menu-item>
        <el-menu-item index="6-2" v-if="permissions_obj.id_101||permissions_obj.id_all">版本升级管理</el-menu-item>
        <el-menu-item index="6-3" v-if="permissions_obj.id_50||permissions_obj.id_all">权限资源管理</el-menu-item>
        <el-menu-item index="6-4" v-if="permissions_obj.id_56||permissions_obj.id_all">角色管理</el-menu-item>
        <el-menu-item index="6-5" v-if="permissions_obj.id_34||permissions_obj.id_all">管理员管理</el-menu-item>
        <!-- <el-menu-item index="6-6">域名管理</el-menu-item> -->
      </el-submenu>
      <el-submenu index="7" v-if="permissions_obj.id_66||permissions_obj.id_all">
        <template slot="title">
          <i class="el-icon-video-camera-solid"></i>
          <span>系统监控</span>
        </template>
        <!-- <el-menu-item index="7-1">错误日志</el-menu-item>
        <el-menu-item index="7-2">用户行为分析</el-menu-item> -->
        <el-menu-item index="7-3" v-if="permissions_obj.id_66||permissions_obj.id_all">操作日志</el-menu-item>
      </el-submenu>
    </el-menu>
  </div>
</template>
<script>
export default {
  props: [],
  data() {
    return {
      //当前账号的权限详情
      permissionsDetail: {},
      permissions:[],
      permissions_obj:{},
    };
  },
  created(){
    //权限判断
    this.permissions = this.$store.state.permissions;
    let oneOff=false;
    this.permissions.forEach((item, index) => {
      if(item==-1){
        oneOff=true;
      }else{
        this.permissions_obj['id_'+item]=item;
      }
    });
    if(oneOff){
      this.permissions_obj.id_all=true;
    }else{
      this.permissions_obj.id_all=false;
    };
  },
  mounted() {
    
  },
  methods: {}
};
</script>
<style scoped>
</style>


